<?php
/**
 * @category   UniKap-Framework
 * @package    Config
 * @subpackage Interfaces
 * @author     Ulf -UniKado- Kadner <ulfikado@gmail.com>
 * @since      2014-03-29 16:17
 * @version    0.1
 */

namespace UF\Config
{

    /**
     * This interface defines all methods for saying a object is a configuration writer.
     * 
     * The writer controls the data writing to a source (e.g. file system, databases, etc.)
     *
     * @since         v0.1
     */
    interface IWriter
    {
        
        /**
         * Writes all defined config values to current used source.
         *
         * @param  \UF\Config\ValueCollection $configValues All configuration values to write
         * @return bool
         * @since  v0.1
         */
        function write( \UF\Config\ValueCollection $configValues );
        
        /**
         * Returns the associated config reader
         * 
         * @return \UF\Config\IReader
         * @since  v0.1
         */
        function getReader();
        
        /**
         * Returns all options of the current writer. It depends to the IWriter implementation.
         * 
         * @return array
         * @since  v0.1
         */
        function getOptions();
        
        /**
         * Returns if writing is anabled.
         * 
         * @return bool
         * @since  v0.1
         */
        function canWrite();

    }

}

